﻿//global using Microsoft.AspNetCore.Http;
//global using Microsoft.AspNetCore.Mvc.TagHelpers;
//global using Microsoft.AspNetCore.Mvc.ViewFeatures;
//global using Microsoft.AspNetCore.Razor.TagHelpers;

//global using WXWorkSvc.Common.Extensions;

//using System.Text.Encodings.Web;

//namespace WXWorkSvc.Common.TagHelpers;
//[HtmlTargetElement("input-group", TagStructure = TagStructure.WithoutEndTag)]
//public class InputGroupTagHelper : TagHelper
//{
//    private readonly IHtmlGenerator _HtmlGenerator;
//    [HtmlAttributeName("asp-readonly")]
//    public bool IsReadonly { get; set; }
//    [HtmlAttributeName("asp-for")]
//    public ModelExpression For { get; set; } = default!;
//    [HtmlAttributeName("asp-para")]
//    public InputPara? Para { get; set; } 
//    [HtmlAttributeNotBound]
//    [ViewContext]
//    public ViewContext ViewContext { get; set; } = default!;
//    public InputGroupTagHelper(IHtmlGenerator generator)
//    {
//        _HtmlGenerator = generator;
//    }
//    public override void Process(TagHelperContext context, TagHelperOutput output)
//    {
//        ViewContext.GetInputGroupParas(out var inputClass, out var requiredMsg, out var stringFormat, out var selectClass, out var selectFormat);

//        var str = _HtmlGenerator.GenerateInputString(ViewContext, context, output,For, Para, inputClass, selectClass, requiredMsg);

//        output.Reinitialize("", TagMode.StartTagAndEndTag);
//        output.Content.SetHtmlContent(string.Format(stringFormat, For.GetDisplayName(), str, For.Name));
//    }
//}

